<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePurchasesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_purchases', function (Blueprint $table) {
            $table->increments('id');
            $table->string('goods_name')->comment('商品名称');
            $table->string('goods_model')->comment('商品型号');
            $table->string('goods_type')->comment('商品类型');
            $table->string('goods_brand')->comment('商品品牌');
            $table->string('image')->comment('商品图片');
            $table->string('factory_phone')->comment('厂家联系方式');
            $table->string('phone')->comment('联系方式');
            $table->integer('doctor_id')->default(0)->comment('医生ID');
            $table->integer('work_id')->default(0)->comment('工作室ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_purchases');
    }
}
